﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Xml.XPath;
using System.Resources;

namespace RunUOGenerator
{
    public class XMLReader
    {
        private string _filename = "";

        private XmlDocument document = new XmlDocument();

        private string FileName { get { return _filename; } set { _filename = value; } }

        public XMLReader()
        {

        }

        public XMLReader(string filename)
        {
            Load(filename);
        }

        public void Load(string filename)
        {
            document.Load(filename);
        }

        public XmlNodeList ReadNode(string node)
        {
            return document.GetElementsByTagName(node);
        }

        public string ReadAttribute(string attribute)
        {
            return document.Attributes[attribute].Value;
        }
    }
}
